package com.yxq.mdt.app.modules.auction.presenter;

import com.yxq.mdt.app.base.BasePresenter;
import com.yxq.mdt.app.modules.auction.bean.AuctionList;
import com.yxq.mdt.app.modules.auction.bean.HonorValueBean;
import com.yxq.mdt.app.modules.auction.bean.MyTeamFansBean;
import com.yxq.mdt.app.modules.auction.model.AuctionModel;
import com.yxq.mdt.app.net.ApiModel;

/**
 * ================================================
 *
 * @function 登录
 * Created by yd on 2019/03/26.
 * ================================================
 */
public class AuctionMyTeamPresenter extends BasePresenter<AuctionMyTeamContract.View, AuctionModel> implements AuctionMyTeamContract.Presenter {

    public AuctionMyTeamPresenter(AuctionMyTeamContract.View view, AuctionModel model) {
        super(view, model);
    }

    @Override
    public void getAuctionFansList(int pageNum, int pageSize) {
        mBaseModel.getAuctionFansList(pageNum, pageSize, new ApiModel.CommonCallback<MyTeamFansBean>() {
            @Override
            public void onSuccess(MyTeamFansBean myTeamFansBean) {
                mRootView.onLoadAuctionListSuccess(myTeamFansBean);
            }

            @Override
            public void onError(String errMsg) {
                mRootView.onLoadAuctionListFailed();
            }
        });
    }

    @Override
    public void getHonorValue() {
        mBaseModel.getHonorValue(new ApiModel.CommonCallback<HonorValueBean>() {
            @Override
            public void onSuccess(HonorValueBean myTeamFansBean) {
                mRootView.onLoadHonorValueBeanSuccess(myTeamFansBean);
            }

            @Override
            public void onError(String errMsg) {
                mRootView.onLoadHonorValueBeanFailed();
            }
        });
    }

}
